import request from '@/utils/request'

// 查询每日座位列表
export function listDailyTrainSeat(query) {
  return request({
    url: '/business/daily-train-seat/list',
    method: 'get',
    params: query
  })
}

// 查询分组后的每日座位列表（按车次和车厢分组）
export function listDailyTrainSeatByGroup(query) {
  return request({
    url: '/business/daily-train-seat/listByGroup',
    method: 'get',
    params: query
  })
}

// 查询每日座位详细
export function getDailyTrainSeat(id) {
  return request({
    url: '/business/daily-train-seat/' + id,
    method: 'get'
  })
}

// 新增每日座位
export function addDailyTrainSeat(data) {
  return request({
    url: '/business/daily-train-seat',
    method: 'post',
    data: data
  })
}

// 修改每日座位
export function updateDailyTrainSeat(data) {
  return request({
    url: '/business/daily-train-seat',
    method: 'put',
    data: data
  })
}

// 删除每日座位
export function delDailyTrainSeat(id) {
  return request({
    url: '/business/daily-train-seat/' + id,
    method: 'delete'
  })
}

// 获取座位售卖详情
export function getSeatSellDetail(query) {
  return request({
    url: '/business/daily-train-seat/sell-detail',
    method: 'get',
    params: query
  })
}

// 查询按车次分组的每日座位列表（分页在车次级别）
export function listDailyTrainSeatByTrainGroup(query) {
  return request({
    url: '/business/daily-train-seat/listByTrainGroup',
    method: 'get',
    params: query
  })
}


